//
//  UserModel.swift
//  whale
//
//  Created by topnet on 2022/3/29.
//

import UIKit

class UserModel: NSObject {
    required init(json: JSON?) {
        guard let json = json else {
            return
        }
        token = json["token"].string
        account = json["account"].string
        nickname = json["nickname"].string
        face = json["face"].string
    }
    
    func toJSON()-> JSON {
        let map = [
            "token": token ?? "",
            "account": account ?? "",
            "nickname": nickname ?? "",
            "face": face ?? ""
        ]
        return JSON(map)
    }
    
    var token: String?
    var account: String?
    var nickname: String?
    var face: String?
    
}
